package com.learner.trade;

import com.learner.common.jpa.SimpleJpaRepositoryImpl;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.domain.EntityScan;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.data.jpa.repository.config.EnableJpaAuditing;
import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
import org.springframework.transaction.annotation.EnableTransactionManagement;

/**
 * @author ice2020x
 * @Description: 启动类
 */
@EnableDiscoveryClient
@EntityScan(basePackages ={"com.learner.pojo.trade"})
@EnableJpaRepositories(basePackages = "com.learner.trade.repository",repositoryBaseClass = SimpleJpaRepositoryImpl.class)
@ComponentScan(basePackages={"com.learner.common"})//扫描common下的所有类
@ComponentScan(basePackages={"com.learner.trade"})
@EnableJpaAuditing //自动填充
@EnableFeignClients
@EnableTransactionManagement
@SpringBootApplication
public class TradeApplication {
    public static void main(String[] args) throws Exception {
        SpringApplication.run(TradeApplication.class, args);
    }
}
